/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.common.service.base.test.faker;

import cn.hutool.core.io.resource.ResourceUtil;
import lombok.SneakyThrows;
import net.datafaker.providers.base.AbstractProvider;
import net.datafaker.providers.base.BaseProviders;

/**
 * <b>(HotpotFakerProvider)</b>
 *
 * @author Lihai
 * @version 1.0.0
 * @since 2023/8/29
 */
public class HotpotFakerProvider extends AbstractProvider<BaseProviders> {

    @SneakyThrows
    public HotpotFakerProvider(BaseProviders faker) {
        super(faker);
        faker.addUrl(faker.getContext().getLocale(), ResourceUtil.getResource("hotpot-data-faker.yml").openConnection()
                .getURL());
    }

    public String adjectiveColor() {
        return resolve("hotpot.adjective.color");
    }

    public String adjectivePositive() {
        return resolve("hotpot.adjective.positive");
    }

    public String noun() {
        return resolve("hotpot.noun");
    }

    public String transformers() {
        return resolve("hotpot.transformers");
    }
}